{% extends "layout/layout.twig" %}
{% from "macros.twig" import breadcrumbs, render_classes, class_link, namespace_link %}
{% block title %}{{ namespace|raw }} | {{ parent() }}{% endblock %}
{% block body_class 'namespace' %}
{% block page_id 'namespace:' ~ (namespace|replace({'\\': '_'})) %}

{% block below_menu %}
    <div class="namespace-breadcrumbs">
        <ol class="breadcrumb">
            <li><span class="label label-default">Namespace</span></li>
            {{ breadcrumbs(namespace) }}
        </ol>
    </div>
{% endblock %}

{% block page_content %}

    <div class="page-header">
        <h1>{{ namespace|raw }}</h1>
    </div>

    {% if subnamespaces %}
        <h2>Namespaces</h2>
        <div class="namespace-list">
            {% for ns in subnamespaces %}{{ namespace_link(ns) }}{% endfor %}
        </div>
    {% endif %}

    {% if classes %}
        <h2>Classes</h2>
        {{ render_classes(classes) }}
    {% endif %}

    {% if interfaces %}
        <h2>Interfaces</h2>
        {{ render_classes(interfaces) }}
    {% endif %}

    {% if exceptions %}
        <h2>Exceptions</h2>
        {{ render_classes(exceptions) }}
    {% endif %}

{% endblock %}
